package com.ean.backpack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ean.backpack.domain.Airportcoordinateslist;
import com.ean.backpack.repository.AirportcoordinateslistRepository;
import com.ean.backpack.service.AirportcoordinateslistService;

@Service
@Transactional
public class AirportcoordinateslistServiceImpl implements
		AirportcoordinateslistService {

	@Autowired
	AirportcoordinateslistRepository airportcoordinateslistRepository;

	public long countAllAirportcoordinateslists() {
		return airportcoordinateslistRepository.count();
	}

	public void deleteAirportcoordinateslist(
			Airportcoordinateslist airportcoordinateslist) {
		airportcoordinateslistRepository.delete(airportcoordinateslist);
	}

	public Airportcoordinateslist findAirportcoordinateslist(String id) {
		return airportcoordinateslistRepository.findOne(id);
	}

	public List<Airportcoordinateslist> findAllAirportcoordinateslists() {
		return airportcoordinateslistRepository.findAll();
	}

	public List<Airportcoordinateslist> findAirportcoordinateslistEntries(
			int firstResult, int maxResults) {
		return airportcoordinateslistRepository.findAll(
				new org.springframework.data.domain.PageRequest(firstResult
						/ maxResults, maxResults)).getContent();
	}

	public void saveAirportcoordinateslist(
			Airportcoordinateslist airportcoordinateslist) {
		airportcoordinateslistRepository.save(airportcoordinateslist);
	}

	public Airportcoordinateslist updateAirportcoordinateslist(
			Airportcoordinateslist airportcoordinateslist) {
		return airportcoordinateslistRepository.save(airportcoordinateslist);
	}
}
